	<form id="edit" class="form-horizontal" method="post" action="${cxt!}/admin/roleRank/edit" >
	
		<input type="hidden" name="id" value="${customerRoleRank.id!}">
		<div class="form-group">
			<label  class="col-md-2 control-label">${_res["role.categoryName"]}</label>
			<div class="col-md-10">
				<#dict type="select" class="form-control" id="categoryName" name="rankUpdate.categoryid" table="customer_role_category" filedName="name" filedValue="id" value="${customerRoleRank.categoryid!}"/>
			</div>
		</div> 
		 
		<div class="form-group">
			<label  class="col-md-2 control-label">${_res["roleRank.roleName"]}</label>
			<div class="col-md-10" id="role">
				<%#ajax ajaxRoleList:{%>
					<select name="rankUpdate.roleid" class="form-control help-block m-b-none">
						<%if(isEmpty(roleList)){%>
							<option></option>
						<%}else{
							for(role in roleList){%>
						<option value="${role.id!}">${role.name!}</option>
						<%}}%>
					</select>
				<%}%>
			</div>
		</div>
		
		<div class="form-group">
			<label class="col-sm-2 control-label">${_res["category.name"]}</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" id="name" placeholder="${_res['category.name']}" name="rankUpdate.name" value="${customerRoleRank.name!}">
	        </div>
		</div>
		
		<div class="form-group">
			<label class="col-sm-2 control-label">${_res["category.nameen"]}</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" id="nameen" placeholder="${_res['category.nameen']}" name="rankUpdate.nameen" value="${customerRoleRank.nameen!}">
	         </div>
		</div>
		
			
		
		<div class="form-group">
	       <div class="col-md-5 col-md-offset-2 control-label">
	       		<% if(hasPrivilegeUrl("/admin/roleRank")){ %>
	         	<button type="button" class="btn btn-warning" onClick="ajaxContent('/admin/roleRank/list')">${_res["system.return"]}</button>
	         	<%}%>
	         	<button type="button" onclick="ajaxForm('content','edit');" class="btn btn-primary">${_res["system.save"]}</button>
	       </div>
       </div>
	</form>
	<script type="text/javascript">
	
	$(function(){
		$("#categoryName").on('change',function(){
			var categoryId=$("#categoryName").val();
			var data = {toUrl:'/realty/customer/roleRank/edit.html#ajaxRoleList',categoryId:categoryId};
			ajaxDiv('role', '/admin/roleRank/getrole', data);
		});
	});

</script>
